
#include <iostream>
#include <fstream>

//ROS stuff
#include "ros/ros.h"

#include "crossloc.h"


int main(int argc, char **argv)
{

  ros::init(argc,argv,"crossloc");
  ROS_INFO("PFUNCIONA!");

  Crossloc *controller = new Crossloc();

//  //Time string for saving purposes
//   time_t now = time(NULL);
//   struct tm* now_time = gmtime(&now);
//   std::stringstream time_str;
//   time_str << now_time->tm_year+1900 <<"_" << now_time->tm_mon+1 <<"_";
//   time_str << now_time->tm_mday <<"_" << now_time->tm_hour <<"_";
//   time_str << now_time->tm_min <<"_" << now_time->tm_sec <<"_";
//  //folder creation
//    std::stringstream folder_name;
//    folder_name << "./trial_" << time_str.str();
//    controller->trial_folder_name = folder_name.str();
//    string folder_string = folder_name.str();
//    mkdir(folder_string.c_str(),S_IRWXU);

  controller->ObjectList_sub = controller->n.subscribe("/otherrobots/detectedobjects",1000,&Crossloc::ObjectList_Callback,controller);

  ros::spin();

  delete controller;


}
